package com.tourismhengyang.beans;

public class TrainTicket {
	private int tid;
	private String tname;
	private String tprice;
	private String tdate;
	private String ctime;
	private String etime;
	private String tgo;
	private String tto;
	private String runtime;
	
	@Override
	public String toString() {
		return "TrainTicket [tid=" + tid + ", tname=" + tname + ", tprice=" + tprice + ", tdate=" + tdate + ", ctime="
				+ ctime + ", etime=" + etime + ", tgo=" + tgo + ", tto=" + tto + ", runtime=" + runtime + "]";
	}

	public int getTid() {
		return tid;
	}

	public void setTid(int tid) {
		this.tid = tid;
	}

	public String getTname() {
		return tname;
	}

	public void setTname(String tname) {
		this.tname = tname;
	}

	public String getTprice() {
		return tprice;
	}

	public void setTprice(String tprice) {
		this.tprice = tprice;
	}

	public String getTdate() {
		return tdate;
	}

	public void setTdate(String tdate) {
		this.tdate = tdate;
	}

	public String getCtime() {
		return ctime;
	}

	public void setCtime(String ctime) {
		this.ctime = ctime;
	}

	public String getEtime() {
		return etime;
	}

	public void setEtime(String etime) {
		this.etime = etime;
	}

	public String getTgo() {
		return tgo;
	}

	public void setTgo(String tgo) {
		this.tgo = tgo;
	}

	public String getTto() {
		return tto;
	}

	public void setTto(String tto) {
		this.tto = tto;
	}

	public String getRuntime() {
		return runtime;
	}

	public void setRuntime(String runtime) {
		this.runtime = runtime;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((ctime == null) ? 0 : ctime.hashCode());
		result = prime * result + ((etime == null) ? 0 : etime.hashCode());
		result = prime * result + ((runtime == null) ? 0 : runtime.hashCode());
		result = prime * result + ((tdate == null) ? 0 : tdate.hashCode());
		result = prime * result + ((tgo == null) ? 0 : tgo.hashCode());
		result = prime * result + tid;
		result = prime * result + ((tname == null) ? 0 : tname.hashCode());
		result = prime * result + ((tprice == null) ? 0 : tprice.hashCode());
		result = prime * result + ((tto == null) ? 0 : tto.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		TrainTicket other = (TrainTicket) obj;
		if (ctime == null) {
			if (other.ctime != null)
				return false;
		} else if (!ctime.equals(other.ctime))
			return false;
		if (etime == null) {
			if (other.etime != null)
				return false;
		} else if (!etime.equals(other.etime))
			return false;
		if (runtime == null) {
			if (other.runtime != null)
				return false;
		} else if (!runtime.equals(other.runtime))
			return false;
		if (tdate == null) {
			if (other.tdate != null)
				return false;
		} else if (!tdate.equals(other.tdate))
			return false;
		if (tgo == null) {
			if (other.tgo != null)
				return false;
		} else if (!tgo.equals(other.tgo))
			return false;
		if (tid != other.tid)
			return false;
		if (tname == null) {
			if (other.tname != null)
				return false;
		} else if (!tname.equals(other.tname))
			return false;
		if (tprice == null) {
			if (other.tprice != null)
				return false;
		} else if (!tprice.equals(other.tprice))
			return false;
		if (tto == null) {
			if (other.tto != null)
				return false;
		} else if (!tto.equals(other.tto))
			return false;
		return true;
	}

	public TrainTicket(int tid, String tname, String tprice, String tdate, String ctime, String etime, String tgo,
			String tto, String runtime) {
		super();
		this.tid = tid;
		this.tname = tname;
		this.tprice = tprice;
		this.tdate = tdate;
		this.ctime = ctime;
		this.etime = etime;
		this.tgo = tgo;
		this.tto = tto;
		this.runtime = runtime;
	}

	public TrainTicket() {
		super();
		// TODO Auto-generated constructor stub
	}
}
